package top.jnaw.jee.utils;

import com.jfinal.plugin.activerecord.cache.ICache;

public class RedisCache implements ICache {

  @Override
  public <T> T get(String cacheName, Object key) {
    return (T) Cache.get(key);
  }

  @Override
  public void put(String cacheName, Object key, Object value) {
    Cache.set(key, value);
  }

  @Override
  public void remove(String cacheName, Object key) {
    Cache.del(key);
  }

  @Override
  public void removeAll(String cacheName) {
    Cache.clean();
  }
}

